The Elder Scrolls Forums

TES Construction Set and Plugins >> General TES Construction Set

Pages: 1
Olaf_Merchant
Curate

Reged: 03/04/03
Posts: 406
Loc: Finland
Complex script help needed
      #2935493 - 08/16/04 09:49 AM

Yup. I'd need some help in creating a quest determined by two globals called: "Slave_unrest" and "Guard_power". Most of you might've figured out what's going on here. But anyways, I'll explain in length: I need a global script checking if the Slave_unrest global is larger in value than the Guard_power. When it is, the PC recieves a journal entry (happens only once), which'll control all the revolting at the mines. The trick here's this: I also need to implement a counter for three weeks, in which another event occurs, a text-box pops up about a courier (yes, like in Daggerfall. I'm a die-hard fan of that game) and the player gets a note in his/her inventory about a visitor in the stronghold. I know this is too hard for my scripting skills, so I'd need a few pointers and tips in where to start?

--------------------
Quoting my favorite madman:
" All these forests shall be lumber for my throne..."

Quoting my favorite barbarian:
"I am the bigger and the stronger, than all these girly monsters"

Some pictures of my latest mod/mods:

http://www.cuneo.us/tesmw/images/Olaf/

Post Extras: Print Post   Remind Me!   Notify Moderator  
Mode_Locrian
Diviner

Reged: 10/07/02
Posts: 2084
Loc: Bjornholm, Rykith Lowlands Region
Re: Complex script help needed [Re: Olaf_Merchant]
      #2935593 - 08/16/04 10:39 AM

Try something like this:

Code:

Begin Olaf_slave_quest_global

short threeWeeks
short addNote

if ( addNote == 1 )
stopScript, "Olaf_slave_quest_global"
endif

if ( getJournalIndex, "Olaf_journal" < 20 )
if ( Slave_unrest > Guard_power )
Journal, "Olaf_journal", 20
set threeWeeks to ( daysPassed + 21 )
endif
endif

if ( daysPassed >= threeWeeks )
if ( addNote == 0 )
MessageBox, "A young courier hands you a letter."
Player->additem, "Olaf_note", 1
set addNote to 1
endif
endif

end



Now, this is a global script, so you'll have to find a way to start it (StartScript, "Olaf_slave_quest_global"). I recommend using the results box of dialogue for someone related to your quest.

--------------------
My Website
Bards of Vvardenfell Thread (New Info 8/15/04)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Olaf_Merchant
Curate

Reged: 03/04/03
Posts: 406
Loc: Finland
Re: Complex script help needed [Re: Mode_Locrian]
      #2936596 - 08/16/04 03:50 PM

I'll give it a try soon. Thankee.

--------------------
Quoting my favorite madman:
" All these forests shall be lumber for my throne..."

Quoting my favorite barbarian:
"I am the bigger and the stronger, than all these girly monsters"

Some pictures of my latest mod/mods:

http://www.cuneo.us/tesmw/images/Olaf/

Post Extras: Print Post   Remind Me!   Notify Moderator  
Olaf_Merchant
Curate

Reged: 03/04/03
Posts: 406
Loc: Finland
Re: Complex script help needed [Re: Olaf_Merchant]
      #2986690 - 08/30/04 02:17 PM

Right. I didn't exactly get the script working while I started it from the dialogue. Both values (Guard_power, Slaver_unrest) were zero at the starting point, but when I called it from a conversation the message box from the first branch pops up in the conversation box, and I get a journal entry. What have I done wrong here?


---------------------
Begin Olaf_slave_quest

short threeWeeks
short addNote

if ( addNote == 1 )
stopScript, "Olaf_slave_quest"
endif

if ( getJournalIndex, "_Painhold_rebellion" < 10 )
if ( Slave_unrest > Guard_power )
Journal, "_Painhold_rebellion", 10
MessageBox, "Suddently, a courier lad dashes to your side. Before you have chances of questioning him, he speaks out that Painhold's slaves have revolted and I should return there at once. After these words were said, he hastily departed."
set threeWeeks to ( daysPassed + 21 )
endif
endif

if ( daysPassed >= threeWeeks )
if ( addNote == 0 )
MessageBox, "A young courier hands you a letter. Again, you are left alone before you have a chance of questioning the odd courier."
Player->additem, "_painhold_letter_Twinlamps", 1
set addNote to 1
endif
endif

end

--------------------
Quoting my favorite madman:
" All these forests shall be lumber for my throne..."

Quoting my favorite barbarian:
"I am the bigger and the stronger, than all these girly monsters"

Some pictures of my latest mod/mods:

http://www.cuneo.us/tesmw/images/Olaf/

Post Extras: Print Post   Remind Me!   Notify Moderator  
Mode_Locrian
Diviner

Reged: 10/07/02
Posts: 2084
Loc: Bjornholm, Rykith Lowlands Region
Re: Complex script help needed [Re: Olaf_Merchant]
      #2986727 - 08/30/04 02:28 PM

Are you sure that the global variables were both set to 0?

before you initiate the script, try typing sv into the console (when you haven't selected anything) to bring up a list of all the values of global variables, and make sure that Guard_Power and Slave_Unrest are both at 0.

Also, you might want to double check in the CS that these variables actually start at 0; sometimes they get set to a different value (not sure why, or how, but it's happened to me).

--------------------
My Website
Bards of Vvardenfell Thread (New Info 8/15/04)


Post Extras: Print Post   Remind Me!   Notify Moderator  
DragoonWraith
Curate

Reged: 06/13/03
Posts: 481
Re: Complex script help needed [Re: Olaf_Merchant]
      #2986739 - 08/30/04 02:30 PM

My guess would be that those two globals have changed sufficiently to set off the conditional by the time you start the script, so it immediately gives you the message box and journal entry. I don't know how you're controlling Slave_Unrest and Guard_Power, but I'm thinking that something is causing Slave_Unrest to be greater than Guard_Power before the script is even started.

--------------------
Tenth Era
MacHall
"She may look cute, but I've heard she can be quite a... Let's just say she can be hard to handle."
~Hugo the Tactician
"Blinding light, bind my foes in unbreakable chains! Disperse the Shadows! Ray of Paralysis!"
~Saradin Carm

Post Extras: Print Post   Remind Me!   Notify Moderator  
Olaf_Merchant
Curate

Reged: 03/04/03
Posts: 406
Loc: Finland
Re: Complex script help needed [Re: DragoonWraith]
      #2986828 - 08/30/04 03:01 PM

Oh, darn. I made a mistake. Sorry. The message popping up was the one from the latter part of the script. It seems that threeweeks doesn't have a chance to get defined to 21 days, and the PC gets the note instantly after the script is started. Odd. How can this be fixed?

--------------------
Quoting my favorite madman:
" All these forests shall be lumber for my throne..."

Quoting my favorite barbarian:
"I am the bigger and the stronger, than all these girly monsters"

Some pictures of my latest mod/mods:

http://www.cuneo.us/tesmw/images/Olaf/

Edited by Olaf_Merchant (08/30/04 03:11 PM)

Post Extras: Print Post   Remind Me!   Notify Moderator  
Mode_Locrian
Diviner

Reged: 10/07/02
Posts: 2084
Loc: Bjornholm, Rykith Lowlands Region
Re: Complex script help needed [Re: Olaf_Merchant]
      #2986882 - 08/30/04 03:16 PM

Yes, yes, I see the problem now.

Revise the script thusly, and it should work:

Begin Olaf_slave_quest

short threeWeeks
short addNote

if ( addNote == 1 )
stopScript, "Olaf_slave_quest"
endif

if ( getJournalIndex, "_Painhold_rebellion" < 10 )
if ( Slave_unrest > Guard_power )
Journal, "_Painhold_rebellion", 10
MessageBox, "Suddently, a courier lad dashes to your side. Before you have chances of questioning him, he speaks out that Painhold's slaves have revolted and I should return there at once. After these words were said, he hastily departed."
set threeWeeks to ( daysPassed + 21 )
endif
endif

if ( GetJournalIndex "_Painhold_rebellion" >= 10 ) ;added this line... now it only makes the check if threeWeeks has already been set.
if ( daysPassed >= threeWeeks )
if ( addNote == 0 )
MessageBox, "A young courier hands you a letter. Again, you are left alone before you have a chance of questioning the odd courier."
Player->additem, "_painhold_letter_Twinlamps", 1
set addNote to 1
endif
endif
endif

end


--------------------
My Website
Bards of Vvardenfell Thread (New Info 8/15/04)


Post Extras: Print Post   Remind Me!   Notify Moderator  
The_Silent_Pyro
Acolyte

Reged: 08/15/04
Posts: 124
Loc: Red Mountain
Re: Complex script help needed [Re: Mode_Locrian]
      #2987707 - 08/30/04 06:36 PM

Yup, that should have been it. I would have posted with an answer to you question sooner, but alas, this was the first time I saw this thread.

--------------------
Never laugh at a live dragon.
--Bilbo Baggins, There and Back Again: a Hobbit's Tale (a.k.a. The Hobbit)

Nerds rule the world. No one else knows it yet.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1


Extra information
0 registered and 3 anonymous users are browsing this forum.

Moderator:  Umrahel, Freddo, Pete, Hungry Donner, Attrebus, Miltiades, tegger 

Print Thread

Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 142

Rate this thread
 
Jump to

The Elder Scrolls Homepage

*
UBB.threads™ 6.3

Click for Privacy Statement © 2003 Bethesda Softworks LLC, a ZeniMax Media company. All Rights Reserved.
PRIVACY POLICY | TERMS & CONDITIONS | LEGAL INFORMATION | CONTACT US